package com.cheejee.goodscenter.module.dto;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.Length;

import com.cheejee.goodscenter.module.entity.Specific;
import com.cheejee.goodscenter.validated.InsertGroup;
import com.cheejee.goodscenter.validated.UpdateGroup;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author CARRY
 * @Date 2020年10月31日上午4:00:35
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SkuSpecificDto {
	
	@NotNull(message = "规格ID不能为空", groups = { UpdateGroup.class })
	private Long id;
	
	@NotBlank(message = "规格名称不能为空", groups = {InsertGroup.class, UpdateGroup.class})
	@Length(max = 200, message = "规格名称长度不能超过200个字", groups = {InsertGroup.class, UpdateGroup.class})
	String name;
	
	@NotBlank(message = "规格值不能为空", groups = {InsertGroup.class, UpdateGroup.class})
	@Length(max = 200, message = "规格值长度不能超过200个字", groups = {InsertGroup.class, UpdateGroup.class})
	String value;
	
}
